package com.itheima.health.service;

import com.itheima.health.entity.PageResult;
import com.itheima.health.entity.QueryPageBean;
import com.itheima.health.exception.HealthException;
import com.itheima.health.pojo.Menu;
import com.itheima.health.pojo.User;

import java.util.List;
import java.util.Set;

/**
 * Description: 用户服务(企业员工)
 * User: Eric
 */
public interface UserService {
    /**
     * 根据登陆用户名称查询用户权限信息
     * @param username
     * @return
     */
    User findByUsername(String username);
    void addUser(User user, Integer[] roleIds) throws HealthException;
    List<Integer> findRoleIdsByUserId(int userId);

    PageResult<User> findPage(QueryPageBean queryPageBean);

    User findById(int id);

    void deleteUserById(int id);

    void updateUser(User user, Integer[] roleIds);

    List<User> findUser();

    Set<Menu> findMenusByUsername(String username);
    List<Menu> getMenuByLoadUserAuthority(String username);

}
